/**
 * Created by Administrator on 2017/3/16 0016.
 */
MusicControl={
    Create:function(){
        var mc={};

        var audio;

        var sdfs;

        mc.loaded=false;

        function MusicOnOff(bl) {
            if (bl) {
                audio.play();
                document.getElementById('Jaudio').volume = 1;
            }
            else {
                audio.pause();
                document.getElementById('Jaudio').volume = 0;
            }
        }


        function guagua() {
            audioAutoPlay('Jaudio');
        }
        function audioAutoPlay(id) {
            audio = document.getElementById(id)
            audio.play();
            audio.pause();
            // document.addEventListener("touchstart", play, false);
            mc.loaded=true;
        }

        mc.startMusic=function() {
            document.addEventListener("WeixinJSBridgeReady", guagua, false);
        }

        return mc;
    }
}
